FillRange Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Replaces each item in a part of a list with a given value.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static void FillRange<T>(
	IList<T> list,
	int start,
	int count,
	T value
)
Visual Basic (Declaration)
Public Shared Sub FillRange(Of T) ( _
	list As IList(Of T), _
	start As Integer, _
	count As Integer, _
	value As T _
)
Visual C++
public:
generic<typename T>
static void FillRange (
	IList<T>^ list, 
	int start, 
	int count, 
	T value
)

Parameters

list
IList<(Of <T>)>
The list to modify.
start
Int32
The index at which to start filling. The first index in the list has index 0.
count
Int32
The number of items to fill.
value
T
The value to fill with.

Type Parameters

T
The type of items in the list.

Exceptions

ExceptionCondition
System..::ArgumentExceptionlist is a read-only list.
System..::ArgumentOutOfRangeExceptionstart or count is negative, or start + count is greater than list.Count.
System..::ArgumentNullExceptionlist is null.

See Also